﻿<phone:PhoneApplicationPage 
    x:Class="Qplus.UI.ChatFriend"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    Style="{StaticResource TranstionPageStyle}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True"
    xmlns:my="clr-namespace:Qplus" Loaded="PhoneApplicationPage_Loaded"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:UI="clr-namespace:Qplus.UI">

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="70"/>
            <RowDefinition/>
            <RowDefinition Height="70"/>
        </Grid.RowDefinitions>

        <Grid Name="head" Grid.Row="0" Background="#EB00E3FF">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="70"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="70"/>
            </Grid.ColumnDefinitions>
            <TextBlock Name="friendName" Text="friendName" Grid.Column="1"
                       HorizontalAlignment="Center" VerticalAlignment="Center"/>
            <my:ButtonEx x:Name="friendInfoBtnEx" Grid.Column="2" BorderThickness="0"
                         Click="friendInfoBtnEx_Click">
                <my:ButtonEx.Background>
                    <ImageBrush ImageSource="/Qplus;component/Pic/user_info_up.png" Stretch="None"/>
                </my:ButtonEx.Background>
                <my:ButtonEx.PressedBackground>
                    <ImageBrush ImageSource="/Qplus;component/Pic/user_info_down.png" Stretch="None"/>
                </my:ButtonEx.PressedBackground>
            </my:ButtonEx>
        </Grid>

        <Grid Name="content" Grid.Row="1" >
            <Grid.Background>
                <ImageBrush ImageSource="/Qplus;component/Pic/total_background_.png" />
            </Grid.Background>
            <ScrollViewer Name="recordSV" VerticalScrollBarVisibility="Auto" Grid.Column="0">
                <toolkit:WrapPanel Name="recordWP" SizeChanged="recordWP_SizeChanged">

                </toolkit:WrapPanel>
            </ScrollViewer>

            <Grid Name="popupGrid" Background="Transparent"
                  HorizontalAlignment="Left" VerticalAlignment="Bottom" Visibility="Collapsed">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="14"/>
                </Grid.RowDefinitions>
                <Image Source="/Qplus;component/Pic/concrol_popuwindow.png" Stretch="None" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" Grid.RowSpan="2"/>
                <Image Source="/Qplus;component/Pic/concrol_popuwindow_bg.png" Stretch="None" Grid.Column="0" Grid.Row="0"/>
                <Image Source="/Qplus;component/Pic/concrol_popuwindow_bg.png" Stretch="None" Grid.Column="1" Grid.Row="0"/>
                <Image Source="/Qplus;component/Pic/concrol_popuwindow_bg.png" Stretch="None" Grid.Column="2" Grid.Row="0"/>
                <my:ButtonEx x:Name="smileyBtnEx" Content="表情" FontSize="20" VerticalContentAlignment="Bottom" 
                             Grid.Column="0" BorderThickness="0" InvisibleMargin="5" Click="smileyBtnEx_Click">
                    <my:ButtonEx.Background>
                        <ImageBrush ImageSource="/Qplus;component/Pic/smiley_btn_nor.png" Stretch="None" AlignmentY="Top" />
                    </my:ButtonEx.Background>
                    <my:ButtonEx.PressedBackground>
                        <ImageBrush ImageSource="/Qplus;component/Pic/smiley_btn_nor.png" Stretch="None" AlignmentY="Top" />
                    </my:ButtonEx.PressedBackground>
                </my:ButtonEx>
                <my:ButtonEx x:Name="picBtnEx" Content="图片" FontSize="20" VerticalContentAlignment="Bottom"
                             Grid.Column="1" BorderThickness="0" InvisibleMargin="5" Click="picBtnEx_Click">
                    <my:ButtonEx.Background>
                        <ImageBrush ImageSource="/Qplus;component/Pic/picture_btn_nor.png" Stretch="None" AlignmentY="Top" />
                    </my:ButtonEx.Background>
                    <my:ButtonEx.PressedBackground>
                        <ImageBrush ImageSource="/Qplus;component/Pic/picture_btn_nor.png" Stretch="None" AlignmentY="Top" />
                    </my:ButtonEx.PressedBackground>
                </my:ButtonEx>
                <my:ButtonEx x:Name="cameraBtnEx" Content="照相" FontSize="20" VerticalContentAlignment="Bottom"
                             Grid.Column="2" BorderThickness="0" InvisibleMargin="5" Click="cameraBtnEx_Click">
                    <my:ButtonEx.Background>
                        <ImageBrush ImageSource="/Qplus;component/Pic/camera_btn_nor.png" Stretch="None" AlignmentY="Top" />
                    </my:ButtonEx.Background>
                    <my:ButtonEx.PressedBackground>
                        <ImageBrush ImageSource="/Qplus;component/Pic/camera_btn_nor.png" Stretch="None" AlignmentY="Top" />
                    </my:ButtonEx.PressedBackground>
                </my:ButtonEx>
            </Grid>
            <Grid Name="talkringGrid" Width="138" Height="149" VerticalAlignment="Bottom" Visibility="Collapsed">
                <Grid.Background>
                    <ImageBrush ImageSource="/Qplus;component/Pic/pls_talk.png" Stretch="None" />
                </Grid.Background>
                <Image Name="talk_ring" Source="/Qplus;component/Pic/talk_ring.png" Stretch="None" VerticalAlignment="Top"/>
                <Image Name="talk_ring1" Source="/Qplus;component/Pic/talk_ring1.png" Stretch="None" VerticalAlignment="Top" Visibility="Collapsed"/>
                <Image Name="talk_ring2" Source="/Qplus;component/Pic/talk_ring2.png" Stretch="None" VerticalAlignment="Top" Visibility="Collapsed"/>
                <TextBlock Text="语音通话中。。。" VerticalAlignment="Bottom" Margin="0,0,0,16" />
            </Grid>
        </Grid>
        
        <Grid Name="bottom" Grid.Row="2">
            <Grid.Background>
                <ImageBrush ImageSource="/Qplus;component/Pic/show_image_bg.png" Stretch="None" />
            </Grid.Background>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="70"/>
                <ColumnDefinition Width="70"/>
                <ColumnDefinition Width="220"/>
                <ColumnDefinition Width="120"/>
            </Grid.ColumnDefinitions>
            <my:ButtonEx x:Name="selectBtn" Grid.Column="0" BorderThickness="0" Click="selectBtn_Click">
                <my:ButtonEx.Background>
                    <ImageBrush ImageSource="/Qplus;component/Pic/type_select_btn_nor.png" />
                </my:ButtonEx.Background>
                <my:ButtonEx.PressedBackground>
                    <ImageBrush ImageSource="/Qplus;component/Pic/type_select_btn_pressed.png" />
                </my:ButtonEx.PressedBackground>
            </my:ButtonEx>
            <my:ButtonEx x:Name="voiceModeBtn" Grid.Column="1" Visibility="Collapsed" Click="voiceModeBtn_Click" BorderThickness="0">
                <my:ButtonEx.Background>
                    <ImageBrush ImageSource="/Qplus;component/Pic/t_chat_btn_voice.png" />
                </my:ButtonEx.Background>
                <my:ButtonEx.PressedBackground>
                    <ImageBrush ImageSource="/Qplus;component/Pic/t_chat_btn_voice_pressed.png" />
                </my:ButtonEx.PressedBackground>
            </my:ButtonEx>
            <my:ButtonEx x:Name="msgModeBtn" Grid.Column="1" Click="msgModeBtn_Click" BorderThickness="0">
                <my:ButtonEx.Background>
                    <ImageBrush ImageSource="/Qplus;component/Pic/msg_mode_btn_nor.png" />
                </my:ButtonEx.Background>
                <my:ButtonEx.PressedBackground>
                    <ImageBrush ImageSource="/Qplus;component/Pic/msg_mode_btn_nor.png" />
                </my:ButtonEx.PressedBackground>
            </my:ButtonEx>
            <my:ButtonEx x:Name="speakBtn" Content="按下开始语音对讲"
                         Grid.Column="2" Grid.ColumnSpan="2" BorderThickness="0"
                         MouseLeftButtonUp="speakBtn_MouseLeftButtonUp" MouseLeftButtonDown="speakBtn_MouseLeftButtonDown">
                <Button.Background>
                    <ImageBrush ImageSource="/Qplus;component/Pic/btn_speak_up.png" />
                </Button.Background>
                <my:ButtonEx.PressedBackground>
                    <ImageBrush ImageSource="/Qplus;component/Pic/btn_speak_down.png" />
                </my:ButtonEx.PressedBackground>
            </my:ButtonEx>
            <ScrollViewer Name="inputSV" Visibility="Collapsed" Grid.Column="2" Width="220" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
                <TextBox x:Name="inputTBox" Text="在这里输入消息" Visibility="Visible" TextWrapping="Wrap" Grid.Column="2" MinWidth="220" TextChanged="inputTBox_TextChanged" />
            </ScrollViewer>
            <UI:RichTextControl x:Name="inputRTC" Visibility="Collapsed" IsInput="True" Grid.Column="2" Margin="10" />
            <my:ButtonEx x:Name="sendMsgBtn" Content="发送" Visibility="Collapsed" Grid.Column="3" BorderThickness="0" Click="sendMsgBtn_Click" IsEnabled="False">
                <my:ButtonEx.Background>
                    <ImageBrush ImageSource="/Qplus;component/Pic/btn_black_bg_up.png" />
                </my:ButtonEx.Background>
                <my:ButtonEx.PressedBackground>
                    <ImageBrush ImageSource="/Qplus;component/Pic/btn_black_bg_down.png" />
                </my:ButtonEx.PressedBackground>
            </my:ButtonEx>
        </Grid>
        <toolkit:WrapPanel x:Name="testWP" Grid.Row="1" Visibility="Collapsed" VerticalAlignment="Bottom">
            <Button Content="test" Visibility="Visible" HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="Black" Click="Button_Click" />
        </toolkit:WrapPanel>
    </Grid>
 
    <!--演示 ApplicationBar 用法的示例代码-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="按钮 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="按钮 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="菜单项 1"/>
                <shell:ApplicationBarMenuItem Text="菜单项 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
